<% feature_for(:reader_list) do %>
<div class="doc-readers text-gray-light">
  <a href="<%= doc.to_path("/readers") %>" class="readers-link" data-remote="true">
    <span class="avatars">
      <% readers.take(5).map do |action| %>
        <%= user_avatar_tag(action.user, style: :tiny, link: false)%>
      <% end %>
    </span>
    <% if doc.reads_count > 5 %>
    ... <%= doc.reads_count %> <%= t(".people") %>
    <% end %>
    <%= t(".has read") %>
  </a>

  <% if action_name == "readers" %>
  <details class="details-reset details-overlay details-overlay-dark" open>
    <summary></summary>
    <details-dialog class="box d-flex flex-column anim-fade-in fast">
     <div class="box-header">
       <button data-close-dialog class="box-btn-octicon btn-octicon float-right"><i class="fas fa-times"></i></button>
       <h3 class="box-title"><%= t(".Reader list") %></h3>
     </div>
      <div class="box-body user-list">
        <% readers.each do |action| %>
          <div class="user-item">
            <%= user_avatar_tag(action.user, style: :tiny) %>
            <%= user_name_tag(action.user) %>
            <span class="time-box">
              <%= timeago action.updated_at.to_date %>
            </span>
          </div>
        <% end %>
      </div>
    </details-dialog>
  </details>
  <% end %>
</div>
<% end %>

